<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
	</body>
</html>
<script>
	// 1-100
	let landmine = parseInt(Math.random() * 100 + 1);
	let min = 1;
	let max = 100;
	
	while(true){
		let num = prompt('请输入数字'+ min +'-'+ max);
		
		if(num == landmine){
			alert('你中雷了');
			break;
		}else if(num > landmine){
			max = num;
		}else{
			min = num;
		}
	}
</script>